package bean;

import java.util.HashMap;
import java.util.Map;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import org.primefaces.context.RequestContext;
import org.primefaces.model.chart.CartesianChartModel;


@ManagedBean
@SessionScoped
public class MenuBean {
	private CartesianChartModel model;
	
	public CartesianChartModel getModel() {
		return model;
	}

	public void setModel(CartesianChartModel model) {
		this.model = model;
	}

	public MenuBean() {
		
	}
	
	public void viewUsuario() {
        Map<String,Object> options = new HashMap<String, Object>();
        options.put("modal", true);
        options.put("draggable", false);
        options.put("resizable", false);
        options.put("contentHeight", 320);
        
        RequestContext.getCurrentInstance().openDialog("usuario", options, null);
        
    }
     
    public void viewConta() {
        Map<String,Object> options = new HashMap<String, Object>();
        options.put("modal", true);
        options.put("draggable", false);
        options.put("resizable", false);               
        options.put("contentHeight", 320);
        options.put("contentWidth", 800);
        
        RequestContext.getCurrentInstance().openDialog("contabanco", options, null);
    }
    
    public void viewCategoriaDespesa(){
    	Map<String,Object> options = new HashMap<String, Object>();
        options.put("modal", true);
        options.put("draggable", false);
        options.put("resizable", false);               
        options.put("contentHeight", 520);
        options.put("contentWidth", 800);
        
        RequestContext.getCurrentInstance().openDialog("categoriadespesa", options, null);
    }
    
    public void viewQuestionario(){
    	Map<String,Object> options = new HashMap<String, Object>();
        options.put("modal", true);
        options.put("draggable", false);
        options.put("resizable", false);               
        options.put("contentHeight", 520);
        options.put("contentWidth", 800);
        
        RequestContext.getCurrentInstance().openDialog("questionario", options, null);
    }
    
    public void closeQuestionario(){
    	Map<String,Object> options = new HashMap<String, Object>();
        options.put("modal", true);
        options.put("draggable", false);
        options.put("resizable", false);               
        options.put("contentHeight", 520);
        options.put("contentWidth", 800);
        
        RequestContext.getCurrentInstance().closeDialog( "questionario");
    }
    
    public void viewCategoriaReceita(){
    	Map<String,Object> options = new HashMap<String, Object>();
        options.put("modal", true);
        options.put("draggable", false);
        options.put("resizable", false);               
        options.put("contentHeight", 320);
        
        RequestContext.getCurrentInstance().openDialog("categoriareceita", options, null);
    }
    
    public void viewPrevisaoDespesa(){
    	Map<String,Object> options = new HashMap<String, Object>();
        options.put("modal", false);
        options.put("draggable", false);
        options.put("resizable", false);               
        options.put("contentHeight", 500);
        options.put("contentWidth", 1300);
        
        RequestContext.getCurrentInstance().openDialog("previsaodespesa", options, null);
    }
    
    public void viewPrevisao(){
    	Map<String,Object> options = new HashMap<String, Object>();
        options.put("modal", true);
        options.put("draggable", false);
        options.put("resizable", false);               
        options.put("contentHeight", 550);
        options.put("contentWidth", 1300);
        
        RequestContext.getCurrentInstance().openDialog("previsao", options, null);
    }
    
    public void viewLimites(){
    	Map<String,Object> options = new HashMap<String, Object>();
        options.put("modal", true);
        options.put("draggable", false);
        options.put("resizable", false);               
        options.put("contentHeight", 550);
        options.put("contentWidth", 550);
        
        RequestContext.getCurrentInstance().openDialog("limitedespesas", options, null);
    }
    
    public void viewResumo(){
    	Map<String,Object> options = new HashMap<String, Object>();
        options.put("modal", true);
        options.put("draggable", false);
        options.put("resizable", false);               
        options.put("contentHeight", 550);
        options.put("contentWidth", 1300);
        
        RequestContext.getCurrentInstance().openDialog("resumo", options, null);
    }
    
    public void viewSaldo(){
    	Map<String,Object> options = new HashMap<String, Object>();
        options.put("modal", true);
        options.put("draggable", false);
        options.put("resizable", false);               
        options.put("contentHeight", 320);
//        options.put("contentWidth", 1300);
        
        RequestContext.getCurrentInstance().openDialog("saldo", options, null);
    }

}

